<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>Sexy Girl</title>
    <link rel="stylesheet" href="http://cdn.amazeui.org/amazeui/2.7.2/css/amazeui.min.css">
    <link rel="stylesheet" href="base/base.css">
	<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
	<script src="http://cdn.amazeui.org/amazeui/2.7.2/js/amazeui.min.js"></script>
	<script src="base/base.js"></script>

<!---->
<style>

</style>
</head>
<body>
  	<header data-am-widget="header" class="am-header am-header-default am-header-fixed">
      <div class="am-header-left am-header-nav">
          <a href="javascript:history.back();" class="">
              <img class="am-header-icon-custom" src="data:image/svg+xml;charset&#x3D;utf-8,&lt;svg xmlns&#x3D;&quot;http://www.w3.org/2000/svg&quot; viewBox&#x3D;&quot;0 0 12 20&quot;&gt;&lt;path d&#x3D;&quot;M10,0l2,2l-8,8l8,8l-2,2L0,10L10,0z&quot; fill&#x3D;&quot;%23fff&quot;/&gt;&lt;/svg&gt;" alt=""/>
          </a>
      </div>

      <h1 class="am-header-title">
          <a href="#title-link" class="">
            Sexy Girl
          </a>
      </h1>
      <div class="am-header-right am-header-nav">
          <div class="am-dropdown" data-am-dropdown>
		  <button class="am-btn am-btn-primary am-dropdown-toggle" data-am-dropdown-toggle><i class="am-header-icon am-icon-bars"></i></button>
		  <ul class="am-dropdown-content">
		    <li><a href="index.html">Sexy </a></li>
		    <li><a href="###">Image </a></li>
		    <li><a href="indextext.html">Sister </a></li>
		    <li><a href="indexJokes.html">Jokes </a></li>
		  </ul>
		</div>
      </div>
  	</header>
	<div data-am-widget="titlebar" class="am-titlebar am-titlebar-multi" style="margin-top:0;">
	    <h2 class="am-titlebar-title ">
	        Sexy Girl
	    </h2>
	
	    <nav class="am-titlebar-nav">
	        <a href="#more-1" class="">手机</a>
	        <a href="#more-2" class="">数码</a>
	        <a href="#more-3" class="">影音</a>
	        <a href="#more-3" class="">影音</a>
	    </nav>
	</div>
	<!-- sexylist -->
	<ul data-am-widget="gallery" class="am-gallery am-avg-sm-2 am-gallery-imgbordered" id="sexylist">
	  
	</ul>
	<!-- sexylist -->
	<div class="load_more">
		<i class="am-icon-spinner am-icon-pulse"></i>
		正在加载...
	</div>

<header class="am-topbar am-topbar-inverse am-topbar-fixed-bottom">
  <div class="am-container">
    <ul class="am-nav am-nav-pills am-nav-justify">
	  <li><a href="index.html">Sexy</a></li>
	  <li><a href="###">Image</a></li>
	  <li><a href="indextext.html">Sister</a></li>
	  <li><a href="indexJokes.html">Jokes</a></li>
	</ul>
  </div>
</header>

<div data-am-widget="gotop" class="am-gotop am-gotop-fixed" >
<a href="#top" title="回到顶部">
    <i class="am-gotop-icon am-icon-chevron-up"></i>
</a>
</div>

<script type="text/javascript">

var scrolls = true,
	deftype = 1,
	defpage = 1;
	
// 类别
sexyAjax();

//列表
defAjax(deftype,defpage);

//
$(".am-titlebar-nav").on("click",'a',function(){
	var href = $(this).attr('href'),
		typeid = href.split("-")[1];
	deftype = typeid;
	loadmore('show');
	$("#sexylist").html("");
	setTimeout(function(){
	  	defAjax(deftype,defpage,function(){
	      	loadmore();
	      });
	},100)
})

$(window).scroll(function() {
    if ($(document).scrollTop() >= $(document).height() - $(window).height()) {
//    console.log(scrolls);
      loadmore('show');
      if(scrolls){
      	scrolls = false;
      	defpage++;

      	defAjax(deftype,defpage,function(){
      		scrolls = true;
	      	loadmore();
	    });
      }
      
    } 
});



</script>


</body>
</html>